<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>万古神帝</title>
    <link rel="stylesheet" href="./css/chapter.css">
    <script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="js/jquery-1.12.4.js"></script>
    <script type="text/javascript" src="js/login.js"></script>
    <link rel="stylesheet" type="text/css" href="css/login-ajax.css">
    <script type="text/javascript" src="./js/clipboard.min.js"></script>
</head>
<body>
<!-- 头部开始 -->
<header class="header">
    <!-- 头部的div用来保证缩放可以正常进行 -->
    <div class="center">
        <div class="header-div">
            <div class="header-left-one">
                <!-- <img src="./images/all.gif" alt=""> -->
                <a class="btnCopy" data-clipboard-text="localhost:8080">将本站设为首页</a>
            </div>
            <div class="header-left-two">
                <a href="#">收藏新笔趣阁</a>
            </div>
            <div class="header-right">
                <c:if test="${empty username}">
                    <form action="/mutilAdmin" class="header-form" id="loginForm">
                        账号：<input type="text" name="username" id="username" class="username">
                        密码：<input type="password" name="password" id="password" class="password">
                        <input type="button" value="登录" id="submit">
                        <a href="register.jsp" class="registration">用户注册</a>
                        <a href="forgetpwd.jsp" class="registration">忘记密码</a>
                    </form>
                </c:if>
                <c:if test="${not empty username}">
                    <span id="ajax">hi,${username}&ensp;
                        <c:if test="${type==3}">超级管理员
                            <a href="/mutilAdmin?_method=selectAdmin" class="svip">超级管理员界面&ensp;|</a>
                        </c:if>
                        <c:if test="${type==2}">管理员
                            <a href="/mutilAdmin?_method=selectAdmin" class="vip">管理员界面&ensp;|</a>
                        </c:if>
                        <c:if test="${type==1}">尊敬的用户
                            <a href='/index.jsp' class='user'>回到首页&ensp;|</a>
                        </c:if>
                    </span>
                    <a href="/BookShelf?_method=myBookShelf">我的书架&ensp;|</a>
                    <a href="forgetpwd.jsp">修改密码&ensp;|</a>
                    <a class="exit">安全退出&ensp;|</a>
                </c:if>

            </div>
            <div class="clear"></div>
        </div>
    </div>
</header>
<!-- --------------------头部结束/整体开始 ----------------------->
<!-- 新笔趣阁图标一栏 -->
<div class="new-penguin center">
    <div id="new-penguin-div">
        <div class="image"><a href="index.jsp"><img src="./images/图标.jpg" alt=""></a></div>
        <div class="form-div">
            <form action="/mutilfind" class="form">
                <input type="search" class="search-box" name="u_username" placeholder="输入需要搜索的内容">
                <input type="hidden" name="_method" value="searchbyab">
                <input type="submit" value="搜索" class="submit-search">
            </form>
        </div>
        <div class="clear"></div>
    </div>
</div>
<!-- 标题 -->
<div class="title center">
    <div class="title-div">
        <!-- <a href="#">首页</a>
            <a href="#">永久书架</a>
            <a href="#">玄幻奇幻</a>
            <a href="#">武侠仙侠</a>
            <a href="#">都市言情</a>
            <a href="#">历史军事</a>
            <a href="#">科幻灵异</a>
            <a href="#">网游竞技</a>
            <a href="#">女频频道</a>
            <a href="#">完本小说</a>
            <a href="#">排行榜单</a>
            <a href="#">临时书架</a> -->
        <ul>
            <li><a href="index.jsp">首页</a></li>
            <li><a href="permbookshelf.jsp">永久书架</a></li>
            <li><a href="fantasy.jsp">玄幻奇幻</a></li>
            <li><a href="wxxx.jsp">武侠仙侠</a></li>
            <li><a href="romance.jsp">都市言情</a></li>
            <li><a href="historymilitary.jsp">历史军事</a></li>
            <li><a href="science.jsp">科幻灵异</a></li>
            <li><a href="olgame.jsp">网游竞技</a></li>
            <li><a href="femate.jsp">女频频道</a></li>
            <li><a href="mutilfind?_method=finishbook">完本小说</a></li>
            <li><a href="mutilBook?_method=topBook">排行榜单</a></li>
            <li><a href="tempbookshelf.jsp">临时书架</a></li>
        </ul>
    </div>
    <div class="clear"></div>
</div>
<!-- 标题结束 -->
<!-------------------- 内容介绍开始 ---------------------->
<div class="introduction center">
    <div class="introduction-div">
        <h3><a href="index.jsp">新笔趣阁</a> &gt; <a href="/mutilfind?c_id=${book.c_id}&_method=findBookBycid">${cname}</a> &gt; ${book.b_name}最新章节列表</h3>
        <div class="introduction-picture">
            <img src="../images/${book.b_image}" width="120px" height="150px">
        </div>
        <div class="introduction-title">
            <h2>${book.b_name}</h2>
            <p class="introduction-title-p-one">作&emsp;&emsp;者：${book.b_author}</p>
            <p>状&emsp;&emsp;态：${sta},<a id="add" class="add&${book.b_id}" style="cursor: pointer">加入书架</a>,<a
                    id="like&${book.b_id}" class="like">投推荐票</a>,<a
                    href="#a_b">直达底部</a></p>
            <p class="introduction-title-p-two">最后更新：${book.b_last_update_time}</p>
            <p>最新章节：${newcontent}</p>
        </div>
        <div class="introduction-contents">
            ${book.b_description}
        </div>
        <div class="introduction-bottom">
            <span>推荐阅读:</span>
            <a href="#" target="_blank">开个诊所来修仙</a>&ensp;
            <a href="#" target="_blank">贵妻</a>&ensp;
            <a href="#" target="_blank">终结剑道</a>&ensp;
            <a href="#" target="_blank">魔女国战绩</a>&ensp;
            <a href="#" target="_blank">地狱</a>&ensp;
            <a href="#" target="_blank">御仙御死</a>&ensp;
            <a href="#" target="_blank">中华功夫异界行</a>&ensp;
            <a href="#" target="_blank">我是道门天师</a>&ensp;
            <a href="#" target="_blank">我还能活多久</a>&ensp;
            <a href="#" target="_blank">我中了五千万</a>&ensp;
        </div>
    </div>
</div>
<!-- ---------------------------章节内容---------------------- -->
<div class="chapter center">
    <div class="chapter-div">
        <h3>${book.b_name}正文</h3>
        <c:forEach items="${chapter}" var="ch">

            <dt>
<%--                第${num[ch]}章 ${ch.ch_name}--%>
                <a href="/mutilBook?ch_id1=${ch.ch_id}&b_name2=${book.b_name}&_method=Bookcontent">第${num[ch]}章 ${ch.ch_name}</a>
            </dt>

        </c:forEach>
    </div>
</div>
<!-- ----------------------------尾部开始-------------------------- -->
<tfoot>
<div class="center f_style">
    <div class="f_firp">
        <p>
        <h6>新书推荐:</h6>
        <a href="#" target="_blank">大主宰</a>
        <a href="#" target="_blank">武炼巅峰</a>
        <a href="#" target="_blank">超品相师</a>
        <a href="#" target="_blank">择天记</a>
        <a href="#" target="_blank">我真是大明星</a>
        <a href="#" target="_blank">帝霸</a>
        <a href="#" target="_blank">太古神王</a>
        <a href="#" target="_blank">雪鹰领主</a>
        <a href="#" target="_blank">玄界之门</a>
        <a href="#" target="_blank">龙王传说</a>
        <a href="#" target="_blank">斗战狂潮</a>
        <a href="#" target="_blank">天影</a>
        <a href="#" target="_blank">美食供应商</a>
        <a href="#" target="_blank">圣墟</a>
        </p>
    </div>
    <hr/>
    <div class="f_last" id="#a_b">
        <p>${book.b_name}</p>
        <p>本站所有小说为转载作品，所有章节均由网友上传，转载至本站只是为了宣传本书让更多读者欣赏。</p>
        <p>Copyright &copy; 2015&nbsp;新笔趣阁&nbsp;All Right Reserved.</p>
    </div>
</div>
</tfoot>
<script type="text/javascript">
    $(function(){
         $("#add").click(function (){
             var arr=$(this).prop("class").split("&")
             var bookId=arr[1];
             $.post(
                 "/BookShelf","_method=addBookToShelf&b_id="+bookId,
                 function (data){
                     alert(data)
                 },"text"
             )
         })

        $(".like").click(function () {
            var arr = $(this).prop("id").split("&");
            var bid = arr[1];
            $.ajax({
                url:"http://localhost:8080/mutilBook",
                type:"post",
                data:{
                    "_method":"likecount",
                    "b_id":bid
                },
                success:function (data) {
                    alert(data)
                }
            })

        })
    })
</script>
</body>

</html>